<html xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui" >

    <ui:composition template="layout.xhtml">
        <ui:define name="corpo">
            <h:form id="criarSecao" acceptcharset="utf-8"> 
                <div id="breadcrumb">
                    <p:commandLink  actionListener="#{managerIndex.redirect('index.xhtml')}" value="Inicio" update="@form" immediate="true"/> >
                    <p:commandLink  actionListener="#{managerIndex.redirect('indexProtocolo.xhtml')}" value="Protocolo" update="@form" immediate="true"/> >
                    <p:commandLink  value="Tramitar" update="@form" immediate="true"/>
                </div>
                <p:panel header="Relatório de Trâmite">
                    <p:messages id="msg" autoUpdate="true"/>
                    <h:panelGrid columns="2" border="0" styleClass="textAlignRight" columnClasses="textAlignRight"> 
                        <h:outputLabel value="Código do Protocolo: "/>
                        <p:inputText value="#{managerTramiteRelatorio.cod}"
                                     id="protocoloInput"
                                     required="true" size="41"  converterMessage="Código inválido"
                                     requiredMessage="O campo Protocolo é obrigatório ">
                            <f:convertNumber type="number" />
                        </p:inputText>
                    </h:panelGrid>
                    

                    <div class="buttonAction">
                        <p:commandButton id="id_submit"  icon="ui-icon-print" 
                                         value="Emitir" actionListener="#{managerTramiteRelatorio.relatorio()}"
                                         update="@form" ajax="false"
                                         onclick="this.form.target='_blank'"/>
                        <p:commandButton value="Cancelar" icon="ui-icon-arrowreturnthick-1-w" 
                                         actionListener="#{managerCorSelo.redirect('indexProtocolo.xhtml')}" 
                                         immediate="true"/>
                    </div>

                </p:panel>   
                <p:ajaxStatus style="width:16px;height:16px;" id="ajaxStatusPanel">  
                    <f:facet name="start">  
                        <h:graphicImage value="/media/img/loading.gif" />  
                    </f:facet>  

                    <f:facet name="complete">  
                        <h:outputText value="" />  
                    </f:facet>  
                </p:ajaxStatus>
            </h:form>
        </ui:define>
    </ui:composition> 
</html>